trigger two functions with one button in javascript